import request from './requestJs.js'
import requestfm from './requestfm.js'

export function endOrder(req) { // 手动结束订单

	return request.post(
		`/app/powerBankOrder/endOrder?userId=${uni.getStorageSync("userId") == ""? "" : parseInt(uni.getStorageSync("userId"))}`,
		req
	)
}

//设备调拨记录
export function terminalAllotLog(req) {
	return requestfm.post(
		'/app/terminal/terminalAllotLog',
		req
	)
}

//新增白名单
export function saveWhiteList(req, id) {
	return request.post(
		`/app/whiteList/saveWhiteList?userId=${id}`,
		req
	)
}

//编辑白名单
export function updateWhiteList(req, id) {
	return request.post(
		`/app/whiteList/updateWhiteList?userId=${id}`,
		req
	)
}

//查询商户下的白名单列表
export function findShopWhiteList(req) {
	return requestfm.post(
		'/app/whiteList/findShopWhiteList',
		req
	)
}

//查询白名单成员列表
export function findWhiteListMemberList(req) {
	return requestfm.get(
		'/app/whiteList/findWhiteListMemberList',
		req
	)
}

// 查询商户网点下拉框
export function findShopBranchBox(req) {
	return requestfm.post(
		'/app/shopBranch/findShopBranchBox',
		req
	)
}
